package cn.bdqn.mapper;

import cn.bdqn.pojo.Users;
import cn.bdqn.vo.UsersVo;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface UsersMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(Users record);

    int insertSelective(Users record);

    Users selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(Users record);

    int updateByPrimaryKey(Users record);

    /**
     * 根据手机查找用户是否存在
     * @param phone
     * @return
     * @throws Exception
     */
    Users findByPhone(String phone)throws Exception;

    /**
     * 根据手机 密码登录
     * @param usersVo
     * @return
     * @throws Exception
     */
    Users findByphoneAndPassword(UsersVo usersVo)throws Exception;
}